{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}F:\fiscal research\mayor\PSRM data\PSRM_descstat1_log.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}19 Dec 2023, 11:17:29
{txt}
{com}. 
. ** Log file for Analysis: Figure 1, Figure A.4, Figure A.5, Table B.1 **
. 
. 
. 
. * Figure 1-(a)
. sort year_monthD
{txt}
{com}. twoway line fed_act_yr_mth_mil year_monthD, ///
>         legend(label(1 "Federal Action Obligation")) /// 
>         xscale(noline) yscale(noline)   ///     
>         ytitle("Grant ($ million)") xtitle("Date") ///
>         ylabel( ,angle(horizontal))     ///
>         tlabel(01oct2005(365)30sep2021, angle(45),) 
{res}{txt}
{com}. 
{txt}end of do-file

{com}. do "C:\Users\heonu\AppData\Local\Temp\STD7864_000000.tmp"
{txt}
{com}. 
. 
. * Figure 1-(b)
. sort award_dept_acr_up
{txt}
{com}. 
. graph bar fed_act_agency_mil, ///
> over (award_dept_acr_up, label(labsize(vsmall) angle(65)) sort(fed_act_agency_mil) descending) ///
> legend(label(1 "Grant")) ylabel(,labsize(small)) ytitle("") ///
> ytitle("Grant ($ million)") b1title("Agency") 
{res}{txt}
{com}. 
{txt}end of do-file

{com}. do "C:\Users\heonu\AppData\Local\Temp\STD7864_000000.tmp"
{txt}
{com}. 
. * Figure A.4
. sort fed_act_mth_mil
{txt}
{com}. graph bar fed_act_mth_mil, ///
> over (action_date_fiscal_mon, label(labsize(vsmall) angle(65))) ///
> legend(label(1 "Grant")) ylabel(,labsize(small)) ytitle("") ///
> ytitle("Grant ($ million)") b1title("Month") 
{res}{txt}
{com}. 
{txt}end of do-file

{com}. do "C:\Users\heonu\AppData\Local\Temp\STD7864_000000.tmp"
{txt}
{com}. 
. drop if cfda_number1==".."
{txt}(154 observations deleted)

{com}. 
. 
. bysort awarding_agency_name cfda_number1: keep if _n==1
{txt}(210,261 observations deleted)

{com}. 
. 
. gen dept=awarding_agency_name
{txt}
{com}. replace dept="Others" if inlist(dept, "CORPORATION FOR NATIONAL AND COMMUNITY SERVICE (CNCS)", "ELECTION ASSISTANCE COMMISSION (EAC)", "EXECUTIVE OFFICE OF THE PRESIDENT (EOP)")
{txt}(9 real changes made)

{com}. replace dept="Others" if inlist(dept, "INSTITUTE OF MUSEUM AND LIBRARY SERVICES (IMLS)", "NATIONAL AERONAUTICS AND SPACE ADMINISTRATION (NASA)", "NATIONAL ARCHIVES AND RECORDS ADMINISTRATION (NARA)")
{txt}(8 real changes made)

{com}. replace dept="Others" if inlist(dept, "NATIONAL ENDOWMENT FOR THE ARTS (NEA)", "SMALL BUSINESS ADMINISTRATION (SBA)", "SOCIAL SECURITY ADMINISTRATION (SSA)", "SURFACE TRANSPORTATION BOARD (STB)")
{txt}(7 real changes made)

{com}. 
. 
. 
. split dept, p("(")
{res}variables created as string: 
{txt}{col 1}dept1{col 8}dept2

{com}. split dept2, p(")")
{res}variable created as string: 
{txt}{col 1}dept21

{com}. 
. 
. 
. replace dept21="Others" if missing(dept21) 
{txt}(24 real changes made)

{com}. 
. * replace dept21="Others" if inlist(dept21, "DOD", "VA", "TREAS")
. 
. 
. 
. * Table B.1 - Column 1, 2
. drop if missing(cfda_number1)
{txt}(0 observations deleted)

{com}. drop if cfda_number1==".."
{txt}(0 observations deleted)

{com}. 
. 
. bysort awarding_agency_name cfda_number1: keep if _n==1 // * total number of grants: 701
{txt}(0 observations deleted)

{com}. 
. gen grant=1
{txt}
{com}. 
. bysort awarding_agency_name: egen grant_count=total(grant)
{txt}
{com}. 
. tabstat grant_count, by(awarding_agency_name) stat(n) // column 1

{txt}Summary for variables: grant_count
{col 6}by categories of: awarding_agency_name 

{ralign 20:awarding_agency_name} {...}
{c |}         N
{hline 21}{c +}{hline 10}
{ralign 20:APPALACHIAN REGIONAL} {...}
{c |}{...}
 {res}        4
{txt}{ralign 20:CONSUMER PRODUCT SAF} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:CORPORATION FOR NATI} {...}
{c |}{...}
 {res}        7
{txt}{ralign 20:DELTA REGIONAL AUTHO} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:DENALI COMMISSION (D} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:DEPARTMENT OF AGRICU} {...}
{c |}{...}
 {res}       48
{txt}{ralign 20:DEPARTMENT OF COMMER} {...}
{c |}{...}
 {res}       20
{txt}{ralign 20:DEPARTMENT OF DEFENS} {...}
{c |}{...}
 {res}       18
{txt}{ralign 20:DEPARTMENT OF EDUCAT} {...}
{c |}{...}
 {res}       68
{txt}{ralign 20:DEPARTMENT OF ENERGY} {...}
{c |}{...}
 {res}       22
{txt}{ralign 20:DEPARTMENT OF HEALTH} {...}
{c |}{...}
 {res}      172
{txt}{ralign 20:DEPARTMENT OF HOMELA} {...}
{c |}{...}
 {res}       28
{txt}{ralign 20:DEPARTMENT OF HOUSIN} {...}
{c |}{...}
 {res}       42
{txt}{ralign 20:DEPARTMENT OF JUSTIC} {...}
{c |}{...}
 {res}       76
{txt}{ralign 20:DEPARTMENT OF LABOR } {...}
{c |}{...}
 {res}       19
{txt}{ralign 20:DEPARTMENT OF THE IN} {...}
{c |}{...}
 {res}       61
{txt}{ralign 20:DEPARTMENT OF THE TR} {...}
{c |}{...}
 {res}        3
{txt}{ralign 20:DEPARTMENT OF TRANSP} {...}
{c |}{...}
 {res}       36
{txt}{ralign 20:DEPARTMENT OF VETERA} {...}
{c |}{...}
 {res}        3
{txt}{ralign 20:ELECTION ASSISTANCE } {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:ENVIRONMENTAL PROTEC} {...}
{c |}{...}
 {res}       54
{txt}{ralign 20:EXECUTIVE OFFICE OF } {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:INSTITUTE OF MUSEUM } {...}
{c |}{...}
 {res}        5
{txt}{ralign 20:NATIONAL AERONAUTICS} {...}
{c |}{...}
 {res}        2
{txt}{ralign 20:NATIONAL ARCHIVES AN} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:NATIONAL ENDOWMENT F} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:SMALL BUSINESS ADMIN} {...}
{c |}{...}
 {res}        3
{txt}{ralign 20:SOCIAL SECURITY ADMI} {...}
{c |}{...}
 {res}        1
{txt}{ralign 20:SURFACE TRANSPORTATI} {...}
{c |}{...}
 {res}        2
{txt}{hline 21}{c +}{hline 10}
{ralign 20:Total} {...}
{c |}{...}
 {res}      701
{txt}{hline 21}{c BT}{hline 10}

{com}. 
. gen grant_count_rat=grant_count/701
{txt}
{com}. 
. tabstat grant_count_rat, by(awarding_agency_name) stat(mean) // column 2

{txt}Summary for variables: grant_count_rat
{col 6}by categories of: awarding_agency_name 

{ralign 20:awarding_agency_name} {...}
{c |}      mean
{hline 21}{c +}{hline 10}
{ralign 20:APPALACHIAN REGIONAL} {...}
{c |}{...}
 {res} .0057061
{txt}{ralign 20:CONSUMER PRODUCT SAF} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:CORPORATION FOR NATI} {...}
{c |}{...}
 {res} .0099857
{txt}{ralign 20:DELTA REGIONAL AUTHO} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:DENALI COMMISSION (D} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:DEPARTMENT OF AGRICU} {...}
{c |}{...}
 {res} .0684736
{txt}{ralign 20:DEPARTMENT OF COMMER} {...}
{c |}{...}
 {res} .0285307
{txt}{ralign 20:DEPARTMENT OF DEFENS} {...}
{c |}{...}
 {res} .0256776
{txt}{ralign 20:DEPARTMENT OF EDUCAT} {...}
{c |}{...}
 {res} .0970043
{txt}{ralign 20:DEPARTMENT OF ENERGY} {...}
{c |}{...}
 {res} .0313837
{txt}{ralign 20:DEPARTMENT OF HEALTH} {...}
{c |}{...}
 {res} .2453638
{txt}{ralign 20:DEPARTMENT OF HOMELA} {...}
{c |}{...}
 {res} .0399429
{txt}{ralign 20:DEPARTMENT OF HOUSIN} {...}
{c |}{...}
 {res} .0599144
{txt}{ralign 20:DEPARTMENT OF JUSTIC} {...}
{c |}{...}
 {res} .1084165
{txt}{ralign 20:DEPARTMENT OF LABOR } {...}
{c |}{...}
 {res} .0271041
{txt}{ralign 20:DEPARTMENT OF THE IN} {...}
{c |}{...}
 {res} .0870185
{txt}{ralign 20:DEPARTMENT OF THE TR} {...}
{c |}{...}
 {res} .0042796
{txt}{ralign 20:DEPARTMENT OF TRANSP} {...}
{c |}{...}
 {res} .0513552
{txt}{ralign 20:DEPARTMENT OF VETERA} {...}
{c |}{...}
 {res} .0042796
{txt}{ralign 20:ELECTION ASSISTANCE } {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:ENVIRONMENTAL PROTEC} {...}
{c |}{...}
 {res} .0770328
{txt}{ralign 20:EXECUTIVE OFFICE OF } {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:INSTITUTE OF MUSEUM } {...}
{c |}{...}
 {res} .0071327
{txt}{ralign 20:NATIONAL AERONAUTICS} {...}
{c |}{...}
 {res} .0028531
{txt}{ralign 20:NATIONAL ARCHIVES AN} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:NATIONAL ENDOWMENT F} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:SMALL BUSINESS ADMIN} {...}
{c |}{...}
 {res} .0042796
{txt}{ralign 20:SOCIAL SECURITY ADMI} {...}
{c |}{...}
 {res} .0014265
{txt}{ralign 20:SURFACE TRANSPORTATI} {...}
{c |}{...}
 {res} .0028531
{txt}{hline 21}{c +}{hline 10}
{ralign 20:Total} {...}
{c |}{...}
 {res} .1108484
{txt}{hline 21}{c BT}{hline 10}

{com}. 
. 
{txt}end of do-file

{com}. do "C:\Users\heonu\AppData\Local\Temp\STD7864_000000.tmp"
{txt}
{com}. 
. * Figure A.5 
. graph pie, over(dept21) sort descending legend(rows(3) size(*.7)) plabel(_all percent, color(white) size(*0.6) format(%2.1f))
{res}{txt}
{com}.  
. 
{txt}end of do-file

{com}. do "C:\Users\heonu\AppData\Local\Temp\STD7864_000000.tmp"
{txt}
{com}. 
. 
. bysort awarding_agency_name: keep if _n==1 
{txt}(672 observations deleted)

{com}. 
. 
. * Table B.1 - Column 3, 4
. 
. 
. gen grant_agen_sum=sum(fed_act_agency_mil) // 57264.12
{txt}
{com}. 
. gen fed_act_agency_mil_rat=fed_act_agency_mil/57264.12
{txt}
{com}. 
. tabstat fed_act_agency_mil, by(awarding_agency_name) stat(mean) // column 3

{txt}Summary for variables: fed_act_agency_mil
{col 6}by categories of: awarding_agency_name 

{ralign 20:awarding_agency_name} {...}
{c |}      mean
{hline 21}{c +}{hline 10}
{ralign 20:APPALACHIAN REGIONAL} {...}
{c |}{...}
 {res} 108.0585
{txt}{ralign 20:CONSUMER PRODUCT SAF} {...}
{c |}{...}
 {res}  .234243
{txt}{ralign 20:CORPORATION FOR NATI} {...}
{c |}{...}
 {res} 131.3495
{txt}{ralign 20:DELTA REGIONAL AUTHO} {...}
{c |}{...}
 {res} 31.01882
{txt}{ralign 20:DENALI COMMISSION (D} {...}
{c |}{...}
 {res}    1.392
{txt}{ralign 20:DEPARTMENT OF AGRICU} {...}
{c |}{...}
 {res} 3287.545
{txt}{ralign 20:DEPARTMENT OF COMMER} {...}
{c |}{...}
 {res} 2091.971
{txt}{ralign 20:DEPARTMENT OF DEFENS} {...}
{c |}{...}
 {res} 135.7589
{txt}{ralign 20:DEPARTMENT OF EDUCAT} {...}
{c |}{...}
 {res} 2874.681
{txt}{ralign 20:DEPARTMENT OF ENERGY} {...}
{c |}{...}
 {res} 2439.279
{txt}{ralign 20:DEPARTMENT OF HEALTH} {...}
{c |}{...}
 {res} 6429.189
{txt}{ralign 20:DEPARTMENT OF HOMELA} {...}
{c |}{...}
 {res} 8630.811
{txt}{ralign 20:DEPARTMENT OF HOUSIN} {...}
{c |}{...}
 {res} 9453.128
{txt}{ralign 20:DEPARTMENT OF JUSTIC} {...}
{c |}{...}
 {res} 1305.562
{txt}{ralign 20:DEPARTMENT OF LABOR } {...}
{c |}{...}
 {res} 167.2109
{txt}{ralign 20:DEPARTMENT OF THE IN} {...}
{c |}{...}
 {res} 244.6479
{txt}{ralign 20:DEPARTMENT OF THE TR} {...}
{c |}{...}
 {res} 2.121759
{txt}{ralign 20:DEPARTMENT OF TRANSP} {...}
{c |}{...}
 {res} 18157.91
{txt}{ralign 20:DEPARTMENT OF VETERA} {...}
{c |}{...}
 {res} 20.02576
{txt}{ralign 20:ELECTION ASSISTANCE } {...}
{c |}{...}
 {res}     .025
{txt}{ralign 20:ENVIRONMENTAL PROTEC} {...}
{c |}{...}
 {res} 1456.345
{txt}{ralign 20:EXECUTIVE OFFICE OF } {...}
{c |}{...}
 {res} 257.5924
{txt}{ralign 20:INSTITUTE OF MUSEUM } {...}
{c |}{...}
 {res} 3.056906
{txt}{ralign 20:NATIONAL AERONAUTICS} {...}
{c |}{...}
 {res} 4.103655
{txt}{ralign 20:NATIONAL ARCHIVES AN} {...}
{c |}{...}
 {res} 1.222121
{txt}{ralign 20:NATIONAL ENDOWMENT F} {...}
{c |}{...}
 {res} 20.70227
{txt}{ralign 20:SMALL BUSINESS ADMIN} {...}
{c |}{...}
 {res} 5.096253
{txt}{ralign 20:SOCIAL SECURITY ADMI} {...}
{c |}{...}
 {res}  .921455
{txt}{ralign 20:SURFACE TRANSPORTATI} {...}
{c |}{...}
 {res} 3.156556
{txt}{hline 21}{c +}{hline 10}
{ralign 20:Total} {...}
{c |}{...}
 {res} 1974.625
{txt}{hline 21}{c BT}{hline 10}

{com}. 
. tabstat fed_act_agency_mil_rat, by(awarding_agency_name) stat(mean) // column 4

{txt}Summary for variables: fed_act_agency_mil_rat
{col 6}by categories of: awarding_agency_name 

{ralign 20:awarding_agency_name} {...}
{c |}      mean
{hline 21}{c +}{hline 10}
{ralign 20:APPALACHIAN REGIONAL} {...}
{c |}{...}
 {res}  .001887
{txt}{ralign 20:CONSUMER PRODUCT SAF} {...}
{c |}{...}
 {res} 4.09e-06
{txt}{ralign 20:CORPORATION FOR NATI} {...}
{c |}{...}
 {res} .0022937
{txt}{ralign 20:DELTA REGIONAL AUTHO} {...}
{c |}{...}
 {res} .0005417
{txt}{ralign 20:DENALI COMMISSION (D} {...}
{c |}{...}
 {res} .0000243
{txt}{ralign 20:DEPARTMENT OF AGRICU} {...}
{c |}{...}
 {res} .0574102
{txt}{ralign 20:DEPARTMENT OF COMMER} {...}
{c |}{...}
 {res}  .036532
{txt}{ralign 20:DEPARTMENT OF DEFENS} {...}
{c |}{...}
 {res} .0023708
{txt}{ralign 20:DEPARTMENT OF EDUCAT} {...}
{c |}{...}
 {res} .0502004
{txt}{ralign 20:DEPARTMENT OF ENERGY} {...}
{c |}{...}
 {res}  .042597
{txt}{ralign 20:DEPARTMENT OF HEALTH} {...}
{c |}{...}
 {res} .1122726
{txt}{ralign 20:DEPARTMENT OF HOMELA} {...}
{c |}{...}
 {res} .1507193
{txt}{ralign 20:DEPARTMENT OF HOUSIN} {...}
{c |}{...}
 {res} .1650794
{txt}{ralign 20:DEPARTMENT OF JUSTIC} {...}
{c |}{...}
 {res} .0227989
{txt}{ralign 20:DEPARTMENT OF LABOR } {...}
{c |}{...}
 {res}   .00292
{txt}{ralign 20:DEPARTMENT OF THE IN} {...}
{c |}{...}
 {res} .0042723
{txt}{ralign 20:DEPARTMENT OF THE TR} {...}
{c |}{...}
 {res} .0000371
{txt}{ralign 20:DEPARTMENT OF TRANSP} {...}
{c |}{...}
 {res} .3170905
{txt}{ralign 20:DEPARTMENT OF VETERA} {...}
{c |}{...}
 {res} .0003497
{txt}{ralign 20:ELECTION ASSISTANCE } {...}
{c |}{...}
 {res} 4.37e-07
{txt}{ralign 20:ENVIRONMENTAL PROTEC} {...}
{c |}{...}
 {res} .0254321
{txt}{ralign 20:EXECUTIVE OFFICE OF } {...}
{c |}{...}
 {res} .0044983
{txt}{ralign 20:INSTITUTE OF MUSEUM } {...}
{c |}{...}
 {res} .0000534
{txt}{ralign 20:NATIONAL AERONAUTICS} {...}
{c |}{...}
 {res} .0000717
{txt}{ralign 20:NATIONAL ARCHIVES AN} {...}
{c |}{...}
 {res} .0000213
{txt}{ralign 20:NATIONAL ENDOWMENT F} {...}
{c |}{...}
 {res} .0003615
{txt}{ralign 20:SMALL BUSINESS ADMIN} {...}
{c |}{...}
 {res}  .000089
{txt}{ralign 20:SOCIAL SECURITY ADMI} {...}
{c |}{...}
 {res} .0000161
{txt}{ralign 20:SURFACE TRANSPORTATI} {...}
{c |}{...}
 {res} .0000551
{txt}{hline 21}{c +}{hline 10}
{ralign 20:Total} {...}
{c |}{...}
 {res} .0344828
{txt}{hline 21}{c BT}{hline 10}

{com}. 
. 
.  
.  
. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}F:\fiscal research\mayor\PSRM data\PSRM_descstat1_log.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}19 Dec 2023, 11:18:06
{txt}{.-}
{smcl}
{txt}{sf}{ul off}